import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Gao zhao xu
 * Date: 2023-11-20
 * Time: 11:34
 */
public class Test5 {
    public static void merge(int x, int y, int[] fa){
        int xFa = find(x, fa);
        int yFa = find(y, fa);
    }
    public static int find(int x, int[] fa){
        if (fa[x - 1] == x) return x;
        else return find(fa[x - 1], fa);
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int[] fa = new int[n];
        for (int i = 0; i < n; i++){
            fa[i] = i + 1;
        }
    }
}
